package com.tubi.ArrayList;
/*
**集合和数组的区别 :**

​	共同点：都是存储数据的容器

​	不同点：数组的容量是固定的，集合的容量是可变的
 */
import com.tubi.domain.Student;

/*
    定义学生类 遍历打印数据
 */
public class ArrayList1 {
    public static void main(String[] args) {
        Student[] arr = new Student[3];
        Student stu1 = new Student("rong",12);
        Student stu2 = new Student("rog",12);
        Student stu3 = new Student("ng",12);
        arr[0] = stu1;
        arr[1] = stu2;
        arr[2] = stu3;
        for (int i = 0; i < arr.length; i++) {
            Student temp = arr[i];
            System.out.println(temp.getName()+"..."+temp.getAge());
        }
    }
}

